-
-
Notifications
You must be signed in to change notification settings - Fork 78
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(bookmarklet): extract youtube track names from page #285
Merged
adrienjoly
merged 15 commits into
master
from
feat/262-fetch-youtube-track-names-from-page
Mar 13, 2020
Merged
feat(bookmarklet): extract youtube track names from page #285
adrienjoly
merged 15 commits into
master
from
feat/262-fetch-youtube-track-names-from-page
Mar 13, 2020
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…ams() -> detectPlayableStreams() + simplify structure
…m a YouTube page when the same track is also listed in the page with less metadata
…page that lists that track as a link
…t track as a link => test passes
…n that track was found as a link from a YouTube page
adrienjoly
pushed a commit
that referenced
this pull request
Mar 13, 2020
This was referenced Mar 13, 2020
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Contributes to #262. Follow up of #281 and #282.
What does this PR do / solve?
After YouTube reduced our API quota, we resorted to specifying "(YouTube track)" as the title of tracked extracted from YouTube pages using the bookmarklet, in order to save some quota.
This PR intends to determine the actual name of the track by extracting text from the DOM, and therefore to get rid of those "(YouTube track)" titles on newly added tracks.
Overview of changes
detectPlayemStreams()
-->detectPlayableStreams()
+ integrateYOUTUBE_PLAYER
(partially imported from PlayemJS, without the API query part) in the bookmarket, and use it also from tests => first step in progressively getting rid of Playem for track detectionHow to test this PR?
$ nvm use $ node_modules/.bin/mocha test/unit/bookmarklet-tests.js $ docker-compose up --build -d $ npm run docker:seed && node_modules/.bin/wdio wdio.conf.js
Also, you can test the bookmarklet manually, from your web browser, by following the instructions provided in the unit test file.